<?php
/** 
 * @author Brian Voss 
 */
class DbController extends Zend_Controller_Action
{
    protected $users;

    public function __construct(Zend_Controller_Request_Abstract $request, Zend_Controller_Response_Abstract $response, array $invokeArgs = array())
    {
	parent::__construct($request, $response, $invokeArgs);
    }

    public function init() {
	$this->users = new Application_Model_User();

	$this->_helper->viewRenderer->setNoRender();
	$this->params = new Zend_Filter_Input(null, null, $this->_request->getParams());
    }
    
    public function indexAction()
    {
	$user_id = $this->users->addRecord('thevossman@gmail.com', 'password');
	$profileObj = new Application_Model_UserProfile($user_id);
	$profile_id = $profileObj->addRecord(1, 'Brian', 'Voss');
	echo "User: $user_id<br />";
	echo "Profile: $profile_id<br />";
    }

    public function theurlAction()
    {
    	$url = 'http://v22.lscache4.googlevideo.com/videoplayback%3Fid%3D9fc734b8ac071c41%26itag%3D5%26begin%3D0%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1303153105%26sparams%3Dip,ipbits,expire,id,itag%26signature%3D2FF6B719DD85DA9259F41E58C80CE020B8A8CE19.6B5F89198C1223FD6F957511029225CCD39B7D5C%26key%3Dck1';
    	echo urldecode($url);
    }
    
}
?>